/*

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
#import "XBMC-Common.h"

typedef enum  {
  kFolder,
  kMusic,
  kVideo,
  kPicture,
  kPlaylist,
  kUnknown
} MediaType;

@interface MediaItem : NSObject
{
   NSString* m_Name;
   NSString* m_Path;
   MediaType m_MediaType;
}


-(id)initWithNameAndPath: (NSString*)name path:(NSString*)path mediaType:(MediaType)mediaType;
-(NSString*)getName;
-(NSString*)getPath;
-(MediaType)getType;
-(UIImage*)getIcon;
-(void)dealloc;
@end


@interface MediaItemFactory : NSObject
{
   NSArray* m_musicExtensions;
   NSArray* m_pictureExtensions;
   NSArray* m_videoExtensions;
}

-(id)initWithExtensions:(NSArray*)musicExtensions pictureExtensions:(NSArray*)pictureExtensions videoExtensions:(NSArray*)videoExtensions;
-(MediaItem*)createMediaItem:(NSString*)name path:(NSString*)path isFolder:(BOOL)isFolder;
-(BOOL)isInArray:(NSString*) value array:(NSArray*)array;
-(NSString*)getFileExtension:(NSString*)path;
-(void)dealloc;

@end
